from datetime import datetime

import pandas as pd

from util import get_day

reachPath = "D:\\中断输入\\到达用户数\\3.4-到达用户数.xlsx"
interrupt_detail_path = "D:\\中断输入\\输出\\3月单用户中断明细.csv"

olt_path = "D:\\中断输入\\OLT业务表的配置查询结果.csv"

# 日均
# 统计结果里的日期
statistics_date = "2025-03"


def get_detail_path(d: datetime):
    # return f"D:\\中断输入\\结果\\中断明细{d.strftime('%Y-%m-%d')}.xlsx"
    return f"D:\\中断输入\\结果\\中断明细{d.strftime('%m.%d')}.xlsx"


def get_statistic_path(d: datetime):
    return f"D:\\中断输入\\输出\\月统计{d.month}-{d.day}.csv"


# 处理后的明细
def get_format_detail_path(d: datetime):
    return f"D:\\中断输入\\中断明细\\中断明细{get_day(d.month)}.{get_day(d.day)}.xlsx"


def get_company_path(d: datetime):
    return f"D:\\中断输入\\分公司\\分公司{get_day(d.month)}.{get_day(d.day)}.xlsx"


def get_gird_path(d: datetime):
    return f"D:\\中断输入\\网格\\网格{get_day(d.month)}.{get_day(d.day)}.xlsx"


def get_cell_path(d: datetime):
    return f"D:\\中断输入\\小区\\小区{get_day(d.month)}.{get_day(d.day)}.xlsx"


def get_net_path(d: datetime):
    return f"D:\\中断输入\\网元\\网元{get_day(d.month)}.{get_day(d.day)}.xlsx"


def get_four_path(d: datetime):
    return f"D:\\中断输入\\结果\\四个指标{d.strftime('%Y-%m-%d')}.xlsx"


def get_company():
    # 定义包含分公司名称的列表
    branch_names = ['中区', '朝阳', '海淀', '丰台', '石门', '房山', '通州', '顺义', '昌平', '大兴', '经开',
                    '怀柔', '平谷', '密云', '延庆', '全市']

    # 创建DataFrame，指定列名为'分公司'
    df = pd.DataFrame(branch_names, columns=['分公司'])
    return df


def getInterruptDetail(d: datetime):
    return f"D:\\中断输入\\明细\\InterruptDetail_V4_北京_{d.strftime('%Y%m%d')}.csv"
